﻿using System;

namespace BotDetector.Core.Detector
{
    public class BotDetectorConfigurator
    {
        private const string tooShortValueKey = "TooShortValue";
        private const string shortValueKey = "ShortValue";
        private const string mediumValueKey = "MediumValue";
        private const string urlGoogleKey = "UrlGoogle";
        private const string apiKeyGoogleKey = "ApiKeyGoogle";
        private const string customSearchEngineGoogleKey = "CustomSearchEngineGoogle";
        private const string doNotApplyFilteringGoogleKey = "FilterGoogle";
        private const string keyBingKey = "ApiKeyBing";
        private const string urlBingKey = "UrlBing";

        public int tooShortValue { get; private set;}
        public int shortValue  { get; private set;}
        public int mediumValue { get; private set;}
        public string urlGoogle { get; private set; }
        public string apiKeyGoogle { get; private set; }
        public string customSearchEngineGoogle { get; private set; }
        public string doNotApplyFilteringGoogle { get; private set; }
        public string keyBing { get; private set; }
        public string urlBing { get; private set; }

   
        public BotDetectorConfigurator()
        {
            tooShortValue = Int32.Parse(System.Configuration.ConfigurationManager.AppSettings.Get(tooShortValueKey));
            shortValue = Int32.Parse(System.Configuration.ConfigurationManager.AppSettings.Get(shortValueKey));
            mediumValue = Int32.Parse(System.Configuration.ConfigurationManager.AppSettings.Get(mediumValueKey));
            urlGoogle = System.Configuration.ConfigurationManager.AppSettings.Get(urlGoogleKey);
            apiKeyGoogle = System.Configuration.ConfigurationManager.AppSettings.Get(apiKeyGoogleKey);
            customSearchEngineGoogle = System.Configuration.ConfigurationManager.AppSettings.Get(customSearchEngineGoogleKey);
            doNotApplyFilteringGoogle = System.Configuration.ConfigurationManager.AppSettings.Get(doNotApplyFilteringGoogleKey);
            keyBing = System.Configuration.ConfigurationManager.AppSettings.Get(keyBingKey);
            urlBing = System.Configuration.ConfigurationManager.AppSettings.Get(urlBingKey);
        }

    }
}
